package com.ruoyi.wx.mapper;

import com.ruoyi.wx.domain.AnnouncementWx;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AnnouncementWxMapper {

    /**
     * 获取所有公告
     * @return
     */
    @Select("select announcement.id,title,category,employee.name,publish_time,content from announcement " +
            "left join employee on announcement.publisher_id = employee.id where announcement.status = 'published'")
    List<AnnouncementWx> list();

}
